
using System;
using QdbUnit;
using Qdb.Internal;
using Qdb.Reflect;
using Qdb.Reflect.Generic;
using Qdb.Tests.Common.Reflect;

namespace Qdb.Tests.Common.Reflect
{
	public class ReflectClassTestCase : ITestCase
	{
		public static void Main(string[] args)
		{
			new ConsoleTestRunner(typeof(ReflectClassTestCase)).Run();
		}

		public virtual void TestNameIsFullyQualified()
		{
			AssertFullyQualifiedName(GetType());
			AssertFullyQualifiedName(typeof(GenericArrayClass));
			AssertFullyQualifiedName(typeof(int[]));
		}

		private void AssertFullyQualifiedName(Type clazz)
		{
			IReflectClass reflectClass = Platform4.ReflectorForType(clazz).ForClass(clazz);
			Assert.AreEqual(ReflectPlatform.FullyQualifiedName(clazz), reflectClass.GetName()
				);
		}
	}
}
